home *** CD-ROM | disk | FTP | other *** search
/ Network Support Library / RoseWare - Network Support Library.iso / apidev / tpapi.exe / NWACCNTG.PA1 < prev    next >
Text File  |  1994-01-14  |  7KB  |  136 lines

  1. {#Z+}
  2. (*(10U&l12D(s4099T&k2S*)
  3. {***************************************************************************}
  4. {** Program : NWACCNTG                                                    **}
  5. {***************************************************************************}
  6. {** Version : 1.53            ** Started : 11/11/91  ** Ended :   /  /    **}
  7. {***************************************************************************}
  8. {******************************** Description ******************************}
  9. {***************************************************************************}
  10. {** OOP library for Netware API                                           **}
  11. {**                                                                       **}
  12. {** This unit forms the second level object : ACCOUNTING                  **}
  13. {** This object is a descandent of          : NETWARE                     **}
  14. {**                                                                       **}
  15. {**                                                                       **}
  16. {**                                                                       **}
  17. {**                                                                       **}
  18. {***************************************************************************}
  19. {******************************** Information ******************************}
  20. {***************************************************************************}
  21. {** Provides Netware Accounting Services.                                 **}
  22. {**                                                                       **}
  23. {**                                                                       **}
  24. {**                                                                       **}
  25. {** This code is (c) 1991 - 1994 Antonio Covelli. ALL RIGHTS RESERVED.    **}
  26. {** Portions (c) Novell Inc,                                              **}
  27. {**                                                                       **}
  28. {**                                                                       **}
  29. {***************************************************************************}
  30.  
  31. {$I NETWARE.INC}
  32. {#Z-}
  33.  
  34. UNIT NWACCNTG;
  35.  
  36. INTERFACE
  37.  
  38. USES
  39.  
  40.   nwvar,
  41.   netware;
  42.  
  43. TYPE
  44.  
  45.   PAccountingOBJ = ^AccountingOBJ;
  46.   AccountingOBJ  = OBJECT (NetwareOBJ)
  47.  
  48.     { This object provides Netware Accounting Services API's. }
  49.  
  50.     FUNCTION GetAccountStatus (BinderyObjectType : WORD;
  51.                                BinderyObjectName : TObjectName;
  52.                                VAR Balance, Limit : LONGINT;
  53.                                VAR Holds : TLongint32Array) : WORD;
  54.     { Allows a server to get an account status at the time of the request. No
  55.       audit record is generated. }
  56.     {#F}
  57.     {}
  58.     { BinderyObjectType: type of object }
  59.     { BinderyObjectName: name of object }
  60.     { Balance          : contains the current balance available }
  61.     { Limit            : contains the credit limit }
  62.     { Holds            : contains all objects with an account hold and the
  63.                     amount on hold}
  64.     {#F}
  65.  
  66.     FUNCTION SubmitAccountCharge (BinderyObjectType : WORD;
  67.                                   BinderyObjectName : TObjectName;
  68.                                   ServiceType : WORD;
  69.                                   ChargeAmount,
  70.                                   HoldCancelAmount : LONGINT;
  71.                                   CommentType : WORD;
  72.                                   Comment : TString255) : WORD;
  73.     { Allows a server to submit a charge to an account. The charge is subtracted
  74.       from the object's account balance, and an audit record is generated. The
  75.       HoldCancelAmount is the same as the amount specified in the previous
  76.       corresponding SubmitAccountHold. If no SubmitAccountHold was made then
  77.       HoldCancelAmount is 0. }
  78.     {#F}
  79.     {}
  80.     { BinderyObjectType: type of object }
  81.     { BinderyObjectName: name of object }
  82.     { ServiceType      : type of service being charged for. Usually assigned by
  83.                     Novell }
  84.     { ChargeAmount     : amount of charge (cost) to be submitted }
  85.     { HoldCancelAmount : see above for details of this parameter }
  86.     { CommentType      : type of comment being charge for. Usually assigned by
  87.                     Novell. Values above $8000 are reserved for experimental
  88.                     purposes. See Comment Types in NWVAR.PAS for more
  89.                     information }
  90.     { Comment          : note to store in the audit file }
  91.     {#F}
  92.  
  93.     FUNCTION SubmitAccountHold (BinderyObjectType : WORD;
  94.                                 BinderyObjectName : TObjectName;
  95.                                 ReserveAmount : LONGINT) : WORD;
  96.     { Allows a server to hold an amount, pending a subsequent charge to the
  97.       object's account. The amount, along with the requesting server's object
  98.       ID is recorded in the object's ACCOUNT_HOLDS property. If the requesting
  99.       server has an outstanding hold, the new hold amount is added to that
  100.       server's outstanding hold amount.
  101.  
  102.       A server can back out a hold by calling SubmitAccountHold with the inverse
  103.       of the amount originally held. A server can also partially back out holds
  104.       by specifying smaller amounts. To clear all holds, a server can submit a
  105.       hold with the amount set to 0. }
  106.     {#F}
  107.     {}
  108.     { BinderyObjectType: type of object }
  109.     { BinderyObjectName: name of object }
  110.     { ReserveAmount    : amount of charge (cost) to be reserved }
  111.     {#F}
  112.  
  113.     FUNCTION SubmitAccountNote (BinderyObjectType : WORD;
  114.                                 BinderyObjectName : TObjectName;
  115.                                 ServiceType, CommentType : WORD;
  116.                                 Comment : TString255) : WORD;
  117.     { Allows a server to record a note about the object's account activities in
  118.       the audit file. EG. When the object logs in. }
  119.     {#F}
  120.     {}
  121.     { BinderyObjectType: type of object }
  122.     { BinderyObjectName: name of object }
  123.     { ServiceType      : type of service being charged for. Usually assigned by
  124.                     Novell }
  125.     { CommentType      : type of comment being charge for. Usually assigned by
  126.                     Novell. Values above $8000 are reserved for experimental
  127.                     purposes. See Comment Types in NWVAR.PAS for more
  128.                     information }
  129.     { Comment          : Note to store in the audit file }
  130.     {#F}
  131.  
  132.     DESTRUCTOR  Done; VIRTUAL;
  133.  
  134.   END;
  135.  
  136.